
const { verificationToken } = require('tools/token');

module.exports = async (ctx, next) => {
    if (verificationToken(ctx.header.authorization)) {
        await next();
    } else {
        ctx.status = 403;
        ctx.body = {
            code: 403,
            message: '请先登录',
        };
    }
}